package com.rattsoftware.client.model;

import com.extjs.gxt.ui.client.data.BaseModelData;
import com.rattsoftware.server.admin.model.Faculty;

public class FacultySummary extends BaseModelData {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Faculty faculty;
	
	public FacultySummary() {}
	
	public FacultySummary(Faculty faculty) {
		setFaculty(faculty);
		setId(faculty.getId());
		setFacultyName(faculty.getName());
		setFacultyDescription(faculty.getDescription());
		setDeansName(faculty.getDean());
		setLocation(faculty.getLocation());
		setNumOfDepartments(faculty.getNumOfDepartments());
	}

	public void setId(String id) {
		faculty.setId(id);
		set("facultyId", id);
	}

	public String getId() {
		return get("facultyId");
	}
	
	public String getFacultyName() {
		return get("facultyName");
	}

	public void setFacultyAddress(String facultyAddress) {
		//faculty.setAddress(facultyAddress);
		set("facultyAddress", facultyAddress);
	}
	
	public String getFacultyAddress() {
		return get("facultyAddress");
	}

	public void setFacultyName(String facultyName) {
		faculty.setName(facultyName);
		set("facultyName", facultyName);
	}

	public String getFacultyDescription() {
		return get("facultyDescription");
	}

	public void setFacultyDescription(String facultyDescription) {
		faculty.setDescription(facultyDescription);
		set("facultyDescription", facultyDescription);
	}

	public String getDeansName() {
		return get("dean");
	}

	public void setDeansName(String deanName) {
		faculty.setDean(deanName);
		set("dean", deanName);
	}

	public String getLocation() {
		return get("location");
	}

	public void setLocation(String location) {
		faculty.setLocation(location);
		set("location", location);
	}

	public String getNumOfDepartments() {
		return get("numOfDepartments");
	}

	public void setNumOfDepartments(String numOfDepartments) {
		faculty.setNumOfDepartments(numOfDepartments);
		set("numOfDepartments", numOfDepartments);
	}

	public void setFaculty(Faculty faculty) {
		this.faculty = faculty;
	}

	public Faculty getFaculty() {
		return faculty;
	}
}
